package com.dm.exceptions;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @Author DongJunJun
 * @Date 2022/9/6 20:23
 */
@AllArgsConstructor
@NoArgsConstructor
public enum ExceptionEnum {
    //邮箱已存在状态
    MAIL_IS_EXISTED("1003","邮箱已存在"),
    //登录账号密码错误
    USER_LOGIN_ERROR("1001","账号密码有误,请重新输入"),
    //验证码还未过期
    MAIL_IS_REQUESTS("1004","验证码已经发送,请勿频繁获取"),
    //系统错误
    MAIL_SEND_ERROR("1007","系统繁忙,请稍后重试"),
    //邮箱为空
    MAIL_NONE_ERROR("1002","邮箱格式错误"),
    //验证码过期
    VERIFY_CODE_TIMEOUT("1005","验证码已过期,请重新获取"),
    //输入的验证码不正确
    VERIFY_CODE_ERROR("1006","验证码错误"),
    //用户未登录
    USER_NONE_LOGIN("0001","用户未登录");

    //状态码
    private  String code;
    //消息
    private  String message;

    public String code(){
        return this.code;
    }

    public String message(){
        return this.message;
    }
}
